import request from '@/utils/request'

// 查询用户权限
export function listDeptPerm(query) {
  return request({
    url: '/system/deptPerm/list',
    method: 'get',
    params: query
  })
}

// 查询用户权限详细
export function getDeptPerm(DeptId) {
  return request({
    url: '/system/deptPerm/' + DeptId,
    method: 'get'
  })
}

// 新增用户权限
export function addDeptPerm(data) {
  return request({
    url: '/system/deptPerm',
    method: 'post',
    data: data
  })
}

// 修改用户权限
export function updateDeptPerm(data) {
  return request({
    url: '/system/deptPerm',
    method: 'put',
    data: data
  })
}

// 删除用户权限
export function delDeptPerm(deptId) {
  return request({
    url: '/system/deptPerm/' + deptId,
    method: 'delete'
  })

}

  // 查询用户账户权限详细
  export function getDeptPermDetail(query) {
    return request({
      url: '/system/deptPerm/deptAccDetailPerm.action',
      method: 'post',
      data: query
    })
  }

// 查询用户组合权限详细
export function getDeptPermGroupDetail(query) {
  return request({
    url: '/system/deptPerm/deptGroupDetailPerm.action',
    method: 'post',
    data: query
  })
}
  // 查询用户账户权限详细
  export function getDeptPermCfgDetail(query) {
    return request({
      url: '/system/deptPerm/deptCfgDetailPerm.action',
      method: 'post',
      data: query
    })
  }

  // 查询部门利率权限详细
  export function getDeptPermIrcDetail(query) {
    return request({
      url: '/system/deptPerm/deptIrcDetailPerm.action',
      method: 'post',
      data: query
    })
  }

  // 查询部门红利权限详细
  export function getDeptPermDivDetail(query) {
    return request({
      url: '/system/deptPerm/deptDivDetailPerm.action',
      method: 'post',
      data: query
    })
  }

  // 查询用户账户权限详细
  export function getDeptPermVlsDetail(query) {
    return request({
      url: '/system/deptPerm/deptVlsetailPerm.action',
      method: 'post',
      data: query
    })
  }
